(0) Obligation:

The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

isort(Cons(x, xs), r) → isort(xs, insert(x, r))
insert(x', Cons(x, xs)) → insert[Ite][False][Ite](<(x', x), x', Cons(x, xs))
isort(Nil, r) → r
insert(x, Nil) → Cons(x, Nil)
inssort(xs) → isort(xs, Nil)

The (relative) TRS S consists of the following rules:

<(S(x), S(y)) → <(x, y)
<(0, S(y)) → True
<(x, 0) → False
insert[Ite][False][Ite](False, x', Cons(x, xs)) → Cons(x, insert(x', xs))
insert[Ite][False][Ite](True, x, r) → Cons(x, r)

Rewrite Strategy: INNERMOST

(1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed relative TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

isort(Cons(x, xs), r) → isort(xs, insert(x, r)) [1]
insert(x', Cons(x, xs)) → insert[Ite][False][Ite](<(x', x), x', Cons(x, xs)) [1]
isort(Nil, r) → r [1]
insert(x, Nil) → Cons(x, Nil) [1]
inssort(xs) → isort(xs, Nil) [1]
<(S(x), S(y)) → <(x, y) [0]
<(0, S(y)) → True [0]
<(x, 0) → False [0]
insert[Ite][False][Ite](False, x', Cons(x, xs)) → Cons(x, insert(x', xs)) [0]
insert[Ite][False][Ite](True, x, r) → Cons(x, r) [0]

Rewrite Strategy: INNERMOST

(3) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID) transformation)

Renamed defined symbols to avoid conflicts with arithmetic symbols:

< => lt

(4) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

isort(Cons(x, xs), r) → isort(xs, insert(x, r)) [1]
insert(x', Cons(x, xs)) → insert[Ite][False][Ite](lt(x', x), x', Cons(x, xs)) [1]
isort(Nil, r) → r [1]
insert(x, Nil) → Cons(x, Nil) [1]
inssort(xs) → isort(xs, Nil) [1]
lt(S(x), S(y)) → lt(x, y) [0]
lt(0, S(y)) → True [0]
lt(x, 0) → False [0]
insert[Ite][False][Ite](False, x', Cons(x, xs)) → Cons(x, insert(x', xs)) [0]
insert[Ite][False][Ite](True, x, r) → Cons(x, r) [0]

Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

isort(Cons(x, xs), r) → isort(xs, insert(x, r)) [1]
insert(x', Cons(x, xs)) → insert[Ite][False][Ite](lt(x', x), x', Cons(x, xs)) [1]
isort(Nil, r) → r [1]
insert(x, Nil) → Cons(x, Nil) [1]
inssort(xs) → isort(xs, Nil) [1]
lt(S(x), S(y)) → lt(x, y) [0]
lt(0, S(y)) → True [0]
lt(x, 0) → False [0]
insert[Ite][False][Ite](False, x', Cons(x, xs)) → Cons(x, insert(x', xs)) [0]
insert[Ite][False][Ite](True, x, r) → Cons(x, r) [0]

The TRS has the following type information:
isort :: Cons:Nil → Cons:Nil → Cons:Nil
Cons :: S:0 → Cons:Nil → Cons:Nil
insert :: S:0 → Cons:Nil → Cons:Nil
insert[Ite][False][Ite] :: True:False → S:0 → Cons:Nil → Cons:Nil
lt :: S:0 → S:0 → True:False
Nil :: Cons:Nil
inssort :: Cons:Nil → Cons:Nil
S :: S:0 → S:0
0 :: S:0
True :: True:False
False :: True:False

Rewrite Strategy: INNERMOST

(7) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


isort
inssort

(c) The following functions are completely defined:

insert
lt
insert[Ite][False][Ite]

Due to the following rules being added:

lt(v0, v1) → null_lt [0]
insert[Ite][False][Ite](v0, v1, v2) → Nil [0]

And the following fresh constants:

null_lt

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

isort(Cons(x, xs), r) → isort(xs, insert(x, r)) [1]
insert(x', Cons(x, xs)) → insert[Ite][False][Ite](lt(x', x), x', Cons(x, xs)) [1]
isort(Nil, r) → r [1]
insert(x, Nil) → Cons(x, Nil) [1]
inssort(xs) → isort(xs, Nil) [1]
lt(S(x), S(y)) → lt(x, y) [0]
lt(0, S(y)) → True [0]
lt(x, 0) → False [0]
insert[Ite][False][Ite](False, x', Cons(x, xs)) → Cons(x, insert(x', xs)) [0]
insert[Ite][False][Ite](True, x, r) → Cons(x, r) [0]
lt(v0, v1) → null_lt [0]
insert[Ite][False][Ite](v0, v1, v2) → Nil [0]

The TRS has the following type information:
isort :: Cons:Nil → Cons:Nil → Cons:Nil
Cons :: S:0 → Cons:Nil → Cons:Nil
insert :: S:0 → Cons:Nil → Cons:Nil
insert[Ite][False][Ite] :: True:False:null_lt → S:0 → Cons:Nil → Cons:Nil
lt :: S:0 → S:0 → True:False:null_lt
Nil :: Cons:Nil
inssort :: Cons:Nil → Cons:Nil
S :: S:0 → S:0
0 :: S:0
True :: True:False:null_lt
False :: True:False:null_lt
null_lt :: True:False:null_lt

Rewrite Strategy: INNERMOST

(9) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(10) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

isort(Cons(x, xs), Cons(x1, xs')) → isort(xs, insert[Ite][False][Ite](lt(x, x1), x, Cons(x1, xs'))) [2]
isort(Cons(x, xs), Nil) → isort(xs, Cons(x, Nil)) [2]
insert(S(x''), Cons(S(y'), xs)) → insert[Ite][False][Ite](lt(x'', y'), S(x''), Cons(S(y'), xs)) [1]
insert(0, Cons(S(y''), xs)) → insert[Ite][False][Ite](True, 0, Cons(S(y''), xs)) [1]
insert(x', Cons(0, xs)) → insert[Ite][False][Ite](False, x', Cons(0, xs)) [1]
insert(x', Cons(x, xs)) → insert[Ite][False][Ite](null_lt, x', Cons(x, xs)) [1]
isort(Nil, r) → r [1]
insert(x, Nil) → Cons(x, Nil) [1]
inssort(xs) → isort(xs, Nil) [1]
lt(S(x), S(y)) → lt(x, y) [0]
lt(0, S(y)) → True [0]
lt(x, 0) → False [0]
insert[Ite][False][Ite](False, x', Cons(x, xs)) → Cons(x, insert(x', xs)) [0]
insert[Ite][False][Ite](True, x, r) → Cons(x, r) [0]
lt(v0, v1) → null_lt [0]
insert[Ite][False][Ite](v0, v1, v2) → Nil [0]

The TRS has the following type information:
isort :: Cons:Nil → Cons:Nil → Cons:Nil
Cons :: S:0 → Cons:Nil → Cons:Nil
insert :: S:0 → Cons:Nil → Cons:Nil
insert[Ite][False][Ite] :: True:False:null_lt → S:0 → Cons:Nil → Cons:Nil
lt :: S:0 → S:0 → True:False:null_lt
Nil :: Cons:Nil
inssort :: Cons:Nil → Cons:Nil
S :: S:0 → S:0
0 :: S:0
True :: True:False:null_lt
False :: True:False:null_lt
null_lt :: True:False:null_lt

Rewrite Strategy: INNERMOST

(11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

Nil => 0
0 => 0
True => 2
False => 1
null_lt => 0

(12) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 1 }→ insert[Ite][False][Ite](lt(x'', y'), 1 + x'', 1 + (1 + y') + xs) :|: z = 1 + x'', xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, x'' >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](1, x', 1 + 0 + xs) :|: xs >= 0, z' = 1 + 0 + xs, x' >= 0, z = x'
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](0, x', 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, x >= 0, z = x'
insert(z, z') -{ 1 }→ 1 + x + 0 :|: x >= 0, z = x, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + x + r :|: z = 2, z'' = r, r >= 0, z' = x, x >= 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + x + insert(x', xs) :|: z' = x', xs >= 0, z = 1, x' >= 0, x >= 0, z'' = 1 + x + xs
inssort(z) -{ 1 }→ isort(xs, 0) :|: xs >= 0, z = xs
isort(z, z') -{ 1 }→ r :|: r >= 0, z = 0, z' = r
isort(z, z') -{ 2 }→ isort(xs, insert[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ lt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x
lt(z, z') -{ 0 }→ 2 :|: z' = 1 + y, y >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: x >= 0, z = x, z' = 0
lt(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1

(13) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(14) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 1 }→ insert[Ite][False][Ite](lt(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 1 }→ isort(z, 0) :|: z >= 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
isort(z, z') -{ 2 }→ isort(xs, insert[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

(15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ lt }
{ insert, insert[Ite][False][Ite] }
{ isort }
{ inssort }

(16) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 1 }→ insert[Ite][False][Ite](lt(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 1 }→ isort(z, 0) :|: z >= 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
isort(z, z') -{ 2 }→ isort(xs, insert[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {lt}, {insert,insert[Ite][False][Ite]}, {isort}, {inssort}

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: lt
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(18) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 1 }→ insert[Ite][False][Ite](lt(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 1 }→ isort(z, 0) :|: z >= 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
isort(z, z') -{ 2 }→ isort(xs, insert[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {lt}, {insert,insert[Ite][False][Ite]}, {isort}, {inssort}
Previous analysis results are:
lt: runtime: ?, size: O(1) [2]

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: lt
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(20) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 1 }→ insert[Ite][False][Ite](lt(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 1 }→ isort(z, 0) :|: z >= 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
isort(z, z') -{ 2 }→ isort(xs, insert[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {insert,insert[Ite][False][Ite]}, {isort}, {inssort}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]

(21) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(22) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 1 }→ insert[Ite][False][Ite](s', 1 + (z - 1), 1 + (1 + y') + xs) :|: s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 1 }→ isort(z, 0) :|: z >= 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
isort(z, z') -{ 2 }→ isort(xs, insert[Ite][False][Ite](s, x, 1 + x1 + xs')) :|: s >= 0, s <= 2, z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {insert,insert[Ite][False][Ite]}, {isort}, {inssort}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: insert
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z + z'

Computed SIZE bound using CoFloCo for: insert[Ite][False][Ite]
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z' + z''

(24) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 1 }→ insert[Ite][False][Ite](s', 1 + (z - 1), 1 + (1 + y') + xs) :|: s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 1 }→ isort(z, 0) :|: z >= 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
isort(z, z') -{ 2 }→ isort(xs, insert[Ite][False][Ite](s, x, 1 + x1 + xs')) :|: s >= 0, s <= 2, z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {insert,insert[Ite][False][Ite]}, {isort}, {inssort}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
insert: runtime: ?, size: O(n1) [1 + z + z']
insert[Ite][False][Ite]: runtime: ?, size: O(n1) [1 + z' + z'']

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: insert
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z'

Computed RUNTIME bound using CoFloCo for: insert[Ite][False][Ite]
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z''

(26) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 1 }→ insert[Ite][False][Ite](s', 1 + (z - 1), 1 + (1 + y') + xs) :|: s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0
insert(z, z') -{ 1 }→ insert[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 1 }→ isort(z, 0) :|: z >= 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
isort(z, z') -{ 2 }→ isort(xs, insert[Ite][False][Ite](s, x, 1 + x1 + xs')) :|: s >= 0, s <= 2, z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {isort}, {inssort}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
insert: runtime: O(n1) [1 + z'], size: O(n1) [1 + z + z']
insert[Ite][False][Ite]: runtime: O(n1) [z''], size: O(n1) [1 + z' + z'']

(27) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(28) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 3 + xs + y' }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (z - 1)) + 1 * (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 3 + xs + y'' }→ s3 :|: s3 >= 0, s3 <= 1 * 0 + 1 * (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 + z' }→ s4 :|: s4 >= 0, s4 <= 1 * z + 1 * (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0
insert(z, z') -{ 2 + x + xs }→ s5 :|: s5 >= 0, s5 <= 1 * z + 1 * (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 1 + xs }→ 1 + x + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 1 }→ isort(z, 0) :|: z >= 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
isort(z, z') -{ 3 + x1 + xs' }→ isort(xs, s1) :|: s1 >= 0, s1 <= 1 * x + 1 * (1 + x1 + xs') + 1, s >= 0, s <= 2, z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {isort}, {inssort}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
insert: runtime: O(n1) [1 + z'], size: O(n1) [1 + z + z']
insert[Ite][False][Ite]: runtime: O(n1) [z''], size: O(n1) [1 + z' + z'']

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: isort
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z + z'

(30) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 3 + xs + y' }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (z - 1)) + 1 * (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 3 + xs + y'' }→ s3 :|: s3 >= 0, s3 <= 1 * 0 + 1 * (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 + z' }→ s4 :|: s4 >= 0, s4 <= 1 * z + 1 * (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0
insert(z, z') -{ 2 + x + xs }→ s5 :|: s5 >= 0, s5 <= 1 * z + 1 * (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 1 + xs }→ 1 + x + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 1 }→ isort(z, 0) :|: z >= 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
isort(z, z') -{ 3 + x1 + xs' }→ isort(xs, s1) :|: s1 >= 0, s1 <= 1 * x + 1 * (1 + x1 + xs') + 1, s >= 0, s <= 2, z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {isort}, {inssort}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
insert: runtime: O(n1) [1 + z'], size: O(n1) [1 + z + z']
insert[Ite][False][Ite]: runtime: O(n1) [z''], size: O(n1) [1 + z' + z'']
isort: runtime: ?, size: O(n1) [z + z']

(31) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: isort
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 1 + 3·z + z·z' + z2

(32) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 3 + xs + y' }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (z - 1)) + 1 * (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 3 + xs + y'' }→ s3 :|: s3 >= 0, s3 <= 1 * 0 + 1 * (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 + z' }→ s4 :|: s4 >= 0, s4 <= 1 * z + 1 * (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0
insert(z, z') -{ 2 + x + xs }→ s5 :|: s5 >= 0, s5 <= 1 * z + 1 * (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 1 + xs }→ 1 + x + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 1 }→ isort(z, 0) :|: z >= 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
isort(z, z') -{ 3 + x1 + xs' }→ isort(xs, s1) :|: s1 >= 0, s1 <= 1 * x + 1 * (1 + x1 + xs') + 1, s >= 0, s <= 2, z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 2 }→ isort(xs, 1 + x + 0) :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
lt(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {inssort}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
insert: runtime: O(n1) [1 + z'], size: O(n1) [1 + z + z']
insert[Ite][False][Ite]: runtime: O(n1) [z''], size: O(n1) [1 + z' + z'']
isort: runtime: O(n2) [1 + 3·z + z·z' + z2], size: O(n1) [z + z']

(33) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(34) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 3 + xs + y' }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (z - 1)) + 1 * (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 3 + xs + y'' }→ s3 :|: s3 >= 0, s3 <= 1 * 0 + 1 * (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 + z' }→ s4 :|: s4 >= 0, s4 <= 1 * z + 1 * (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0
insert(z, z') -{ 2 + x + xs }→ s5 :|: s5 >= 0, s5 <= 1 * z + 1 * (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 1 + xs }→ 1 + x + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 2 + 3·z + z2 }→ s9 :|: s9 >= 0, s9 <= 1 * z + 1 * 0, z >= 0
isort(z, z') -{ 4 + s1·xs + x1 + 3·xs + xs2 + xs' }→ s7 :|: s7 >= 0, s7 <= 1 * xs + 1 * s1, s1 >= 0, s1 <= 1 * x + 1 * (1 + x1 + xs') + 1, s >= 0, s <= 2, z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 3 + x·xs + 4·xs + xs2 }→ s8 :|: s8 >= 0, s8 <= 1 * xs + 1 * (1 + x + 0), z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
lt(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {inssort}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
insert: runtime: O(n1) [1 + z'], size: O(n1) [1 + z + z']
insert[Ite][False][Ite]: runtime: O(n1) [z''], size: O(n1) [1 + z' + z'']
isort: runtime: O(n2) [1 + 3·z + z·z' + z2], size: O(n1) [z + z']

(35) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: inssort
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(36) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 3 + xs + y' }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (z - 1)) + 1 * (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 3 + xs + y'' }→ s3 :|: s3 >= 0, s3 <= 1 * 0 + 1 * (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 + z' }→ s4 :|: s4 >= 0, s4 <= 1 * z + 1 * (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0
insert(z, z') -{ 2 + x + xs }→ s5 :|: s5 >= 0, s5 <= 1 * z + 1 * (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 1 + xs }→ 1 + x + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 2 + 3·z + z2 }→ s9 :|: s9 >= 0, s9 <= 1 * z + 1 * 0, z >= 0
isort(z, z') -{ 4 + s1·xs + x1 + 3·xs + xs2 + xs' }→ s7 :|: s7 >= 0, s7 <= 1 * xs + 1 * s1, s1 >= 0, s1 <= 1 * x + 1 * (1 + x1 + xs') + 1, s >= 0, s <= 2, z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 3 + x·xs + 4·xs + xs2 }→ s8 :|: s8 >= 0, s8 <= 1 * xs + 1 * (1 + x + 0), z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
lt(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed: {inssort}
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
insert: runtime: O(n1) [1 + z'], size: O(n1) [1 + z + z']
insert[Ite][False][Ite]: runtime: O(n1) [z''], size: O(n1) [1 + z' + z'']
isort: runtime: O(n2) [1 + 3·z + z·z' + z2], size: O(n1) [z + z']
inssort: runtime: ?, size: O(n1) [z]

(37) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: inssort
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 2 + 3·z + z2

(38) Obligation:

Complexity RNTS consisting of the following rules:

insert(z, z') -{ 3 + xs + y' }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (z - 1)) + 1 * (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0
insert(z, z') -{ 3 + xs + y'' }→ s3 :|: s3 >= 0, s3 <= 1 * 0 + 1 * (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0
insert(z, z') -{ 1 + z' }→ s4 :|: s4 >= 0, s4 <= 1 * z + 1 * (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0
insert(z, z') -{ 2 + x + xs }→ s5 :|: s5 >= 0, s5 <= 1 * z + 1 * (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0
insert(z, z') -{ 1 }→ 1 + z + 0 :|: z >= 0, z' = 0
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert[Ite][False][Ite](z, z', z'') -{ 1 + xs }→ 1 + x + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs
insert[Ite][False][Ite](z, z', z'') -{ 0 }→ 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0
inssort(z) -{ 2 + 3·z + z2 }→ s9 :|: s9 >= 0, s9 <= 1 * z + 1 * 0, z >= 0
isort(z, z') -{ 4 + s1·xs + x1 + 3·xs + xs2 + xs' }→ s7 :|: s7 >= 0, s7 <= 1 * xs + 1 * s1, s1 >= 0, s1 <= 1 * x + 1 * (1 + x1 + xs') + 1, s >= 0, s <= 2, z = 1 + x + xs, xs >= 0, x1 >= 0, z' = 1 + x1 + xs', x >= 0, xs' >= 0
isort(z, z') -{ 3 + x·xs + 4·xs + xs2 }→ s8 :|: s8 >= 0, s8 <= 1 * xs + 1 * (1 + x + 0), z = 1 + x + xs, xs >= 0, x >= 0, z' = 0
isort(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
lt(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0
lt(z, z') -{ 0 }→ 2 :|: z' - 1 >= 0, z = 0
lt(z, z') -{ 0 }→ 1 :|: z >= 0, z' = 0
lt(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0

Function symbols to be analyzed:
Previous analysis results are:
lt: runtime: O(1) [0], size: O(1) [2]
insert: runtime: O(n1) [1 + z'], size: O(n1) [1 + z + z']
insert[Ite][False][Ite]: runtime: O(n1) [z''], size: O(n1) [1 + z' + z'']
isort: runtime: O(n2) [1 + 3·z + z·z' + z2], size: O(n1) [z + z']
inssort: runtime: O(n2) [2 + 3·z + z2], size: O(n1) [z]

(39) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(40) BOUNDS(1, n^2)